#ifndef ENUMERATORS_H
#define ENUMERATORS_H

#include <QtCore>

class Enumerators
{
public:

    class ProtectionType
    {
        public:
        enum Protection_e
        {
            PUBLIC,
            PROTECTED,
            PRIVATE,
            PACKAGE
         };

        static Protection_e protectionFromString(const QString string)
        {
            Protection_e prot = PUBLIC;

            if(string.compare("PROTECTED",Qt::CaseInsensitive) == 0)
            {
                prot = PROTECTED;
            }
            else if(string.compare("PRIVATE",Qt::CaseInsensitive) == 0)
            {
                prot = PRIVATE;
            }
            else if(string.compare("PACKAGE",Qt::CaseInsensitive) == 0)
            {
                prot = PACKAGE;
            }

          return prot;
        }
    };

    class VirtualType
    {
        public:
        enum VirtualType_e
        {
            NON_VIRTUAL,
            VIRTUAL,
            PURE_VIRTUAL
        };

        static VirtualType_e virtualFromString(const QString string)
        {
            VirtualType_e virt = NON_VIRTUAL;

            if(string.compare("VIRTUAL",Qt::CaseInsensitive) == 0)
            {
              virt = VIRTUAL;
            }
            else if(string.compare("PURE_VIRTUAL",Qt::CaseInsensitive) == 0)
            {
                virt = PURE_VIRTUAL;
            }

          return virt;
        }
    };

    class SectionDefKind
    {

    public:
        enum DoxSectionKind_E
        {
          USER_DEFINED = 0,
          PUBLIC_TYPE,
          PUBLIC_FUNC,
          PUBLIC_ATTRIB,
          PUBLIC_SLOT,
          SIGNAL_T,
          DCOP_FUNC,
          PROPERTY,
          EVENT,
          PUBLIC_STATIC_FUNC,
          PUBLIC_STATIC_ATTRIB,
          PROTECTED_TYPE,
          PROTECTED_FUNC,
          PROTECTED_ATTRIB,
          PROTECTED_SLOT,
          PROTECTED_STATIC_FUNC,
          PROTECTED_STATIC_ATTRIB,
          PACKAGE_TYPE,
          PACKAGE_FUNC,
          PACKAGE_ATTRIB,
          PACKAGE_STATIC_FUNC,
          PACKAGE_STATIC_ATTRIB,
          PRIVATE_TYPE,
          PRIVATE_FUNC,
          PRIVATE_ATTRIB,
          PRIVATE_SLOT,
          PRIVATE_STATIC_FUNC,
          PRIVATE_STATIC_ATTRIB,
          FRIEND,
          RELATED,
          DEFINE,
          PROTOTYPE,
          TYPEDEF,
          ENUM,
          FUNC,
          VAR,
          UNKNOWN
        };

        static const DoxSectionKind_E DoxSectionKindFromString(const QString& typeString)
        {
          DoxSectionKind_E kind;
            kind = PUBLIC_FUNC; //default

            if (typeString.compare("user-defined")==0)
              {
                kind =USER_DEFINED;
              }
              else if (typeString.compare("public-type")==0)
              {
                kind = PUBLIC_TYPE;
              }
            else if (typeString.compare("public-func")==0)
            {
              kind = PUBLIC_FUNC;
            }
              else if (typeString.compare("public-attrib")==0)
              {
                kind = PUBLIC_ATTRIB;
              }
              else if (typeString.compare("public-slot")==0)
              {
                kind = PUBLIC_SLOT;
              }
              else if (typeString.compare("signal")==0)
              {
                kind=SIGNAL_T;
              }
              else if (typeString.compare("dcop-func")==0)
              {
                kind = DCOP_FUNC;
              }
              else if (typeString.compare("property")==0)
              {
                kind = PROPERTY;
              }
              else if (typeString.compare("event")==0)
              {
                kind = EVENT;
              }
              else if (typeString.compare("public-static-func")==0)
              {
                kind = PUBLIC_STATIC_FUNC;
              }
              else if (typeString.compare("public-static-attrib")==0)
              {
                kind = PUBLIC_STATIC_ATTRIB;
              }
              else if (typeString.compare("protected-type")==0)
              {
               kind = PROTECTED_TYPE;
              }
              else if (typeString.compare("protected-func")==0)
              {
                kind = PROTECTED_FUNC;
              }
              else if (typeString.compare("protected-attrib")==0)
              {
                kind = PROTECTED_ATTRIB;
              }
              else if (typeString.compare("protected-slot")==0)
              {
                kind = PROTECTED_SLOT;
              }
              else if (typeString.compare("protected-static-func")==0)
              {
                kind = PROTECTED_STATIC_FUNC;
              }
              else if (typeString.compare("protected-static-attrib")==0)
              {
                kind =PROTECTED_STATIC_FUNC;
              }
              else if (typeString.compare("package-type")==0)
              {
                kind = PACKAGE_TYPE;
              }
              else if (typeString.compare("package-func")==0)
              {
                kind = PACKAGE_FUNC;
              }
              else if (typeString.compare("package-attrib")==0)
              {
                kind = PACKAGE_ATTRIB;
              }
              else if (typeString.compare("package-static-func")==0)
              {
                kind = PACKAGE_STATIC_FUNC;
              }
              else if (typeString.compare("package-static-attrib")==0)
              {
                kind = PACKAGE_STATIC_ATTRIB;
              }
              else if (typeString.compare("private-type")==0)
              {
                kind = PRIVATE_TYPE;
              }
              else if (typeString.compare("private-func")==0)
              {
                kind =PRIVATE_FUNC;
              }
              else if (typeString.compare("private-attrib")==0)
              {
                kind = PRIVATE_ATTRIB;
              }
              else if (typeString.compare("private-slot")==0)
              {
                kind = PRIVATE_SLOT;
              }
              else if (typeString.compare("private-static-func")==0)
              {
                kind = PRIVATE_STATIC_FUNC;
              }
              else if (typeString.compare("private-static-attrib")==0)
              {
                kind = PRIVATE_STATIC_ATTRIB;
              }
              else if (typeString.compare("friend")==0)
              {
                kind = FRIEND;
              }
              else if (typeString.compare("related")==0)
              {
                kind = RELATED;
              }
              else if (typeString.compare("define")==0)
              {
                kind = DEFINE;
              }
              else if (typeString.compare("prototype")==0)
              {
                kind = PROTOTYPE;
              }
              else if (typeString.compare("typedef")==0)
              {
                kind = TYPEDEF;
              }
              else if (typeString.compare("enum")==0)
              {
                kind = ENUM;
              }
              else if (typeString.compare("func")==0)
              {
                kind = FUNC;
              }
              else if (typeString.compare("var")==0)
              {
                kind = VAR;
              }

            return kind;
        }
    };

    class DoxMemeberKind
    {
    public:
      enum DoxMemeberKind_T
      {
        DEFINE,
        PROPERTY,
        EVENT,
        VARIABLE,
        TYPEDEF,
        ENUM,
        FUNCTION,
        SIGNAL_T,
        PROTOTYPE,
        FRIEND,
        DCOP,
        SLOT_T,
        UNKNOWN
      };

      DoxMemeberKind_T static DoxMemeberKindFromString(const QString typeString)
      {
        DoxMemeberKind_T kind;
        if(typeString.compare("define")==0)
          {
            kind = DEFINE;
          }
        else if(typeString.compare("property")==0)
          {
            kind = PROPERTY;
          }
        else if(typeString.compare("event")==0)
          {
            kind = EVENT;
          }
        else if(typeString.compare("variable")==0)
          {
            kind = VARIABLE;
          }
        else if(typeString.compare("typedef")==0)
          {
            kind = TYPEDEF;
          }
        else if(typeString.compare("enum")==0)
          {
            kind = ENUM;
          }
        else if(typeString.compare("function")==0)
          {
            kind = FUNCTION;
          }
        else if(typeString.compare("signal")==0)
          {
            kind = SIGNAL_T;
          }
        else if(typeString.compare("prototype")==0)
          {
            kind = PROTOTYPE;
          }
        else if(typeString.compare("friend")==0)
          {
            kind = FRIEND;
          }
        else if(typeString.compare("dcop")==0)
          {
            kind = DCOP;
          }
        else if(typeString.compare("slot")==0)
          {
            kind = SLOT_T;
          }
        else
          {
            kind = UNKNOWN;
          }
        return kind;
      }

    };
};

#endif // ENUMERATORS_H
